<?php
 /*******************************************************************************
 * @filename: edit.ctp
 *
 * @author: immer_baldos
 *
 * @description: user/edit view
 *
 * @history:
 *
 *   VERSION   DATE                   BY          NOTES
 *  ---------------------------------------------------------------
 *     1.0     September  9, 2009     immer        initial bake
 *
 *     2.0     September 12, 2009     immer        hid auto generated fields
 *
 ******************************************************************************/
 ?>
 <div class="users form">
<?php echo $form->create('User');?>
	<fieldset>

	<legend>
	<?php
	    __('Edit User');
	?>
	</legend>

	<?php
		echo $form->input('id');
	    echo $form->input('username');
		echo $form->hidden('password');
		echo $form->hidden('old_password');
		echo $form->input('date_changed');
        echo $form->input('role', array('options' => array(
            'admin',
            'finance',
            'collector',
            'product officer',
            'sales',
            'customer'
        ), 'selected' => $trole));

	?>
	</fieldset>
<?php echo $form->end('Submit');?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Delete', true), array('action' => 'delete', $form->value('User.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $form->value('User.id'))); ?></li>
		<li><?php echo $html->link(__('List Users', true), array('action' => 'index'));?></li>
	</ul>
</div>
